dragData["files"] question
Mike Bonner
bonnmike at gmail.com
Sun Oct 17 15:18:50 EDT 2010
Does this have to do the the can't get and set the same property in a
handler issue? I'm thinking its not possible to modify the dragdata during
the operation. I experimented with a weird send in time thing and managed
to output the right stuff but it would only do so after a click somewhere in
the window. Tried a few different things none of which worked
satisfactorily.
If it were me i'd sidestep the whole issue and just use a separate home
rolled container to store tFilePaths, whether it be a property or whatever.
On Sun, Oct 17, 2010 at 12:34 PM, FlexibleLearning <
admin at flexiblelearning.com> wrote:
> Hi Klaus,
>
> Duh! Getting tired, or old, or both!
>
> But even correcting the read-only as you point out, setting the
> dragData["files"] fails to update the array.
>
> Will continue to ponder, but it appears not to be settable.
>
> Hugh Senior
> FLCo
>
>
>
> Klaus wrote:
> Hi Hugh,
>
> > Is it my syntax, or is it simply not possible to modify the
> > dragData["files"] during a file drag operation?
> >
> > If I drag a .png file and a .rev file, I would expect the .rev filepath
> to
> > have been removed, but it isn't...
> >
> > on dragEnter
> > put the dragData["files"] into tFilePaths
> > set the itemDel to "."
> > repeat for each line L in tFilePaths
> > if (last item of L is NOT among the items of "GIF.JPG.JPEG.PNG")
> > then delete line lineOffset(CR&L&CR,CR&tFilePaths&CR) of tFilePaths
> > end repeat
> > set the dragData["files"] to tFilePaths
> > put the dragData["files"] --> Value does not get updated!
> > end dragEnter
> >
> > So what am I missing?
>
> repeat for each is read only, but you try to change tFilePaths on the fly
> :-)
>
> Do this:
>
> on dragEnter
> put the dragData["files"] into tFilePaths
> set the itemDel to "."
> repeat for each line L in tFilePaths
> if (last item of L is among the items of "GIF.JPG.JPEG.PNG") then
> put l & CR after tFilePaths2
> end if
> end repeat
> delete char -1 of tFilePaths2
> set the dragData["files"] to tFilePaths2
> put the dragData["files"] --> Value does not get updated!
> end dragEnter
>
> > Hugh Senior
> > FLCo
>
> Best
>
> Klaus
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list