Announcement
Collapse
No announcement yet.
Explorer Objects Action Plugin
Collapse
X
-
I will take a look when i get home from work, unfortunetly, AMS and PB dont work on my mobile :(, lol
-
What's wrong with this code ?
Well, at first i'd like to thank RizlaUK alot for such an incredible plugin , i'd also want to thank imagine-programming for attending continue developping this plugin.
Both of them since i have been a forum member gave alot of help.
So i was hopefully being answered about the following code :
on the dropfiles event of the explorerlist i put the following code:
Code:if sEvent == "OnDropFiles" then sSourcePath = sArgument sTargetPath = ExplorerList.GetPath("Explorer") sTargetPath = String.TrimRight(sTargetPath, "\\"); File.Copy(sSourcePath, sTargrtPath, true, true, false, true, nil); end
But i got all the time zero KB files copied . with the same name .
Thanks in advance.Last edited by eleyea(sa); 09-16-2010, 01:40 AM.
Leave a comment:
-
I will, thanks mate :yesOriginally posted by RizlaUK View Postim pretty sure the redrawing was down to something in the callback and not the use of UseGadgetList....pretty sure, give it a test (it worked ok for me with the Tree :yes)
yea, PB rocks!
Leave a comment:
-
im pretty sure the redrawing was down to something in the callback and not the use of UseGadgetList....pretty sure, give it a test (it worked ok for me with the Tree :yes)
yea, PB rocks!
Leave a comment:
-
Haha
Well I appreciate all the help mate, I'll comment the living he.ll out of the sources and test some more,
but if there were redrawing issues with UsedGadgetList I could be bugtracing those as well, so people, maybe
not this week!

Indeed, but really, there are so many awesome functions in PureBasic... UseGadgetList does shorten the code
alot lol, try doing it using only native windows api
Leave a comment:
-
ok, as far as i can remember, i used UseGadgetList and i had some redrawing isseus, changed back to the temp window but it was something else compleatly but naver changed it back coz it was working anyway (if it aint broke then dont fix it) so i stuck with the temp window method
but it seems its not 100% reliable that way, UseGadgetList is the way to go (also the way im doing it now in my plugin), i guess Fred & Co provided that function for a good reason, huh?
note to self......learn to comment code!!!
Edit:
No, the List was also not refreshing, it also needs changing, while your at it, id do the combo as well :yes
Edit2:
So much for not working on that project any more, iv just spent 2 hours on it, lol
Leave a comment:
-
Oh I was already wondering why you had that uncommented in one plugin but not in the other!Originally posted by RizlaUK View PostBas, comment out the OpenWindow if statement (that opens the temporary window) and use "UseGadgetList(WindowHandle)" instead and it will work :yes
Thanks, now I know haha
Did the ListIcon also not refresh properly? Because that's where I found those lines commented
Thanks much Dean
Leave a comment:
-
Bas, comment out the OpenWindow if statement (that opens the temporary window) and use "UseGadgetList(WindowHandle)" instead and it will work :yes
Leave a comment:
-
Bas, you can disable the host proc, its only for resizing the object, you can add a SetSize function to take care of it and resize from the page OnSize event.....its a bit of a downer yea, but id rather have to resize the object than it not see any pen drives, six of 1 and half a dozen of the other
the main callback is coming from the container object, you can disable the Host proc and still get your events, just the object wont resize with the ListBox
Edit:
forget that, i disabled the proc and it made no difference :(Last edited by RizlaUK; 09-15-2010, 03:16 PM.
Leave a comment:
-
Ah thanks for the information, but disabling the resize proc would be a downer heheOriginally posted by RizlaUK View Posti just ran some tests, with the current plugin i am working on the Explorer objects update as soon as i plugin in a USB pen drive, but with the old plugin it does not update (just like you said)
so Bas, your facing some redrawing issues (if you have not fixed it already) i'll shut down my project for a while and open up the Explorer and see if i can get it to refresh when a pen drive is plugged in
it might have something to do with the "HostResizeProc", subclassing the ListBox might be stopping the objects from updating (all 3 suffer the same fate here) but in my plugin it works fine (no host subclass)
try and disable the resize proc and see it it works :yes
But, if you don't subclass the host, then how the heck are you getting things to work?!
Anyhow, I'll check it out later.
Emanuele, thanks for the info on the updating issue :yes If you want to beta, send me a
mail (address in my sig) and I'll send it to yah when it's done :yes
Leave a comment:
-
i just ran some tests, with the current plugin i am working on the Explorer objects update as soon as i plugin in a USB pen drive, but with the old plugin it does not update (just like you said)
so Bas, your facing some redrawing issues (if you have not fixed it already) i'll shut down my project for a while and open up the Explorer and see if i can get it to refresh when a pen drive is plugged in
it might have something to do with the "HostResizeProc", subclassing the ListBox might be stopping the objects from updating (all 3 suffer the same fate here) but in my plugin it works fine (no host subclass)
try and disable the resize proc and see it it works :yes
Leave a comment:
-
I have already tried but without success.
Also tried:Code:ExplorerTree.SetSelectedPath ("Explorer_Tree", sDisconnected_drive_letter..":\\"); -- a NON existing drive letter
Actually it correctly select the root of the drive, even if the drive does not exist anymore. I also tried a Page.Redraw but no success.Code:ExplorerTree.SetSelectedPath ("Explorer_Tree", sNext_drive_letter..":\\"); an existing drive letter
Leave a comment:
-
Hi Bas,I'll be doing some more stuff to the plugins...
because I've seen you are working on an update of Explorer plugings (many thanks also for this), I could suggest a necessary function.
The ExplorerTree (I've not tried ExplorerCombo yet) does not update the drive list when an external drive has been connected or disconnected while ExplorerTree is displayed.
I'm working on a project specialized in external drive management and this function will be welcome, perhaps with the possibility of a function similar to "ExplorerTree.UpdateDriveList()".
I'm available for the beta testing (XP sp2 x86, XP sp3 x86 and Vista Home Premium).
Many thanks in advance,
EmanueleLast edited by Cybergraph; 09-15-2010, 01:18 PM.
Leave a comment:
-
Well (I know srod, what a pro huh?) I can understand that actually, because when I tried removing props before setting the original callback in my project where I had lists first, I got a crashOriginally posted by RizlaUK View Postyea, MSDN gives a stern warning about memory leaks when not removing props before you destroy a window, iv never had a crash such as that happen tho
another example of rushing out code!
iv got a system now to remove stuff i attach to a window, clear the structure, free its memory and then remove all props with a callback (ignoring PB_ props tho, that causes errors as well)
while on the subject tho.....id better check my code and make sure im removing every thing.....just to make sure!
someone on the PB forum (srod) i think said in a post that its a good idea to restore the previous window callback before removing the prop, maybe i'll do that as well just to keep with the good advice
But setting the callback before removing it fixed the issue.
Leave a comment:
Leave a comment: