Re: Bizarre Number Sort of Files Mac

2018-03-10 Thread Brian Milby via use-livecode
That strange dictionary entry was due to a bug in the parser. It is fixed
now (9DP11 does not have that bug, not sure about 8).

Now, not sure about the actual sort issue...
On Sat, Mar 10, 2018 at 10:27 PM Sannyasin Brahmanathaswami via
use-livecode  wrote:

> Well the dictionary has this cryptic entry
>
> "If you don't specify a sortType, the sortType is text.
> numbers)"
>
> ??
>
> I thought, wrongly so, sort alpha text, ascending, was the default
>
> sort line fld "imageIist"  # would get you want
>
> But the solution was simple
>
> sort lines fld "imageList" ascending text  # this gets want I need
>
> So, the default is mysterious; but, explicitly call, will work.
>
> BR
>
>
>
> Bob Sneidar wrote:
>
> Hmmm... I ran into this a few days ago. If you sort numeric, and any
> of the values are not numeric, the sort fails silently. I would have
> expected it to sort with the affinity for numeric, but that apparently is
> not how the sort command works. If you were to simply sort without the
> numeric arguement, it would work, since your filenames are already padded
> with zeros. If this needs to work with *any* file list, I think you may be
> in trouble.
>
> One option would be to iterate in a repeat loop through each line,
> then iterate through each character, adding the current character to a
> value then checking if the value is a number. When it's not, put char 1 to
> -2 of the value into item 1 of a new list, the actual filename into item 2
> of the new list, sort lines of  numeric ascending by item 1 of each,
> then iterate through the lies again, putting item 2 of each line in a new
> list.
>
> You could create a function that does this.
>
> Bob S
>
>
> >On Mar 9, 2018, at 10:46 , PEL via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >When you add text to a number, it ceases to be a number.
> >If you had a space between 01-11-04-09-_2018 and the rest of the line
> you might be able to
> >sort lines of field “TheFiles” dateTime ascending by word one of each
> >Paul Looney
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Bizarre Number Sort of Files Mac

2018-03-10 Thread Sannyasin Brahmanathaswami via use-livecode
Well the dictionary has this cryptic entry

"If you don't specify a sortType, the sortType is text.
numbers)"

??

I thought, wrongly so, sort alpha text, ascending, was the default 

sort line fld "imageIist"  # would get you want

But the solution was simple

sort lines fld "imageList" ascending text  # this gets want I need

So, the default is mysterious; but, explicitly call, will work.

BR



Bob Sneidar wrote:

Hmmm... I ran into this a few days ago. If you sort numeric, and any of the 
values are not numeric, the sort fails silently. I would have expected it to 
sort with the affinity for numeric, but that apparently is not how the sort 
command works. If you were to simply sort without the numeric arguement, it 
would work, since your filenames are already padded with zeros. If this needs 
to work with *any* file list, I think you may be in trouble. 

One option would be to iterate in a repeat loop through each line, then 
iterate through each character, adding the current character to a value then 
checking if the value is a number. When it's not, put char 1 to -2 of the value 
into item 1 of a new list, the actual filename into item 2 of the new list, 
sort lines of  numeric ascending by item 1 of each, then iterate through 
the lies again, putting item 2 of each line in a new list. 

You could create a function that does this. 

Bob S


>On Mar 9, 2018, at 10:46 , PEL via use-livecode 
 wrote:
>When you add text to a number, it ceases to be a number.
>If you had a space between 01-11-04-09-_2018 and the rest of the line you 
might be able to
>sort lines of field “TheFiles” dateTime ascending by word one of each
>Paul Looney



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Unicode inconsistency

2018-03-10 Thread Brian Milby via use-livecode
With colourful pictures:

http://forums.livecode.com/viewtopic.php?f=5=30718

Richmond.

Bug report 21055

--

Quite interesting.  Especially that decimal worked.

On Sat, Mar 10, 2018 at 1:56 AM, Richmond Mathewson <
richmondmathew...@gmail.com> wrote:

>
>
> On 10/3/2018 1:32 am, Brian Milby wrote:
>
> Can you select the character and manually change the font and have it
> change? Wondering if the font in that field somehow was off.
>
>
> Dunno: it certainly makes me feel "off".
>
> Well, for starters, I set the font of the field to Devawriter.ttf via the
> Properties palette . . .
>
> Selecting the text in the fld and changing the font makes no difference at
> all (LC 8.1.8).
>
> What IS odd, is that IFF one sets the numToCodePoint(0x9AD) [for instance]
> the correct glyph
> is displayed in both the field and the Message box.
>
> This would suggest (?) that the way Unicode 'stuff' is implemented in the
> Message box is somehow
> different from the way it is implemented in fields . . .
>
> This is a "bother".
>
> For those of you who care about this sort of thing Unicode UA8FD is a
> glyph inwith the "Devanagari Extended" set
> that was implemented a while back.
>
> As "All of this" is happening on a Macintosh I shall wander over to a
> Linux machine this afternoon
> and see 'what gives': although, whatever gives, that's a pox for
> cross-platform understanding.
>
> Richmond.
>
>
> Brian
>
> On Fri, Mar 9, 2018 at 4:09 PM Richmond Mathewson <
> richmondmathew...@gmail.com> wrote:
>
>> I am using my Devawriter.ttf font which has a Jain Om at the Unicode 10.0
>> standardised address for that glyph.
>>
>>
>> Richmond.
>>
>> On 9/3/2018 10:36 pm, Brian Milby wrote:
>>
>> Is it a font issue? I get an empty box on Win10 and a box with a ? inside
>> on my Mac. Had to go to fileformat.info to see what it should look like.
>>
>>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When me is not me

2018-03-10 Thread Brian Milby via use-livecode
Ali, he was doing the former. So could this actually be a bug?
On Sat, Mar 10, 2018 at 6:17 AM Ali Lloyd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> In theory that shouldn't be the problem - `the  of me` should
> short-circuit to directly evaluating the property of the object with the
> behavior, rather than evaluating `me` as a name first. This is why `put the
> long id of me into tID` also works.
>
> Peter, in your original script are you doing
>  set the hilitedButton of me to tNum
> directly, or
> local tMe
> put me into tMe
> set the hilitedButton of tMe to tNum
> ?
>
> The latter will have the 'not on the current card' problem, whereas the
> former should (in theory) not.
>
> On Sat, Mar 10, 2018 at 2:41 AM Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I think I know what is going on.  If you add a couple of put statements
> to
> > that script you will find that "me" by itself doesn't include the card or
> > stack.  So "put me" would give something like [group "Language Choice"]
> > which isn't specific enough from another card.  This works:
> >
> > local tID
> > put the long id of me into tID
> > set the hilitedButton of tID to tNum
> >
> > But it can be simpler:
> >
> > set the hilitedButton of the long id of me to tNum
> >
> > I didn't do it from an openStack script, but from the message box while
> on
> > another card.
> >
> > Thanks,
> > Brian
> >
> > On Fri, Mar 9, 2018 at 8:10 PM Peter Bogdanoff via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > Yes, it works great if you are on the card, not if you are somewhere
> > else.
> > >
> > >
> > > > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode <
> > > use-livecode@lists.runrev.com> wrote:
> > > >
> > > > Nevermind. Another card. DOH
> > > >
> > > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner 
> > wrote:
> > > >
> > > >> What version?  Its working for me in 9 dp11 by using either dispatch
> > or
> > > >> send to the group.
> > > >>
> > > >> In the group:
> > > >> command doit pbtn
> > > >>   set the hilitedbutton of me to pbtn
> > > >> end doit
> > > >>
> > > >> And from the message box..
> > > >>
> > > >> send ("doit" && 2) to group 1
> > > >> or
> > > >> dispatch "doit" to group 1 with 3
> > > >>
> > > >>
> > > >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode <
> > > >> use-livecode@lists.runrev.com> wrote:
> > > >>
> > > >>> I learned something today.
> > > >>>
> > > >>> I was trying by script to set the hilite of a radio button in a
> group
> > > on
> > > >>> another card.
> > > >>>
> > > >>> My script is in the group “Language Choice” which is called by
> > > openStack.
> > > >>> I’m thinking that “me” would operate on the group:
> > > >>>
> > > >>>set the hilitedButton of me to tNum
> > > >>>
> > > >>> Didn’t work, even though the script received the message and
> > completed.
> > > >>> The radio buttons were unchanged. I modified it to this, which
> > worked:
> > > >>>
> > > >>>set the hilitedButton of group "Language Choice" of card
> > > >>> "Settings" to tNum
> > > >>>
> > > >>>
> > > >>> I can only think that, a group, even though it is on a single card
> > and
> > > >>> does not have its backgroundBehavior set to true, must be referred
> to
> > > >>> explicitly by the name of the group and the name of the card is
> > > resides in.
> > > >>> Or maybe it’s because the individual buttons didn't have
> sharedHilite
> > > set
> > > >>> to true.
> > > >>>
> > > >>> Peter Bogdanoff
> > > >>> ArtsInteractive
> > > >>>
> > > >>>
> > > >>> ___
> > > >>> use-livecode mailing list
> > > >>> use-livecode@lists.runrev.com
> > > >>> Please visit this url to subscribe, unsubscribe and manage your
> > > >>> subscription preferences:
> > > >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> > > >>
> > > >>
> > > >>
> > > > ___
> > > > use-livecode mailing list
> > > > use-livecode@lists.runrev.com
> > > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > >
> > >
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> 

Re: When me is not me

2018-03-10 Thread Ali Lloyd via use-livecode
In theory that shouldn't be the problem - `the  of me` should
short-circuit to directly evaluating the property of the object with the
behavior, rather than evaluating `me` as a name first. This is why `put the
long id of me into tID` also works.

Peter, in your original script are you doing
 set the hilitedButton of me to tNum
directly, or
local tMe
put me into tMe
set the hilitedButton of tMe to tNum
?

The latter will have the 'not on the current card' problem, whereas the
former should (in theory) not.

On Sat, Mar 10, 2018 at 2:41 AM Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I think I know what is going on.  If you add a couple of put statements to
> that script you will find that "me" by itself doesn't include the card or
> stack.  So "put me" would give something like [group "Language Choice"]
> which isn't specific enough from another card.  This works:
>
> local tID
> put the long id of me into tID
> set the hilitedButton of tID to tNum
>
> But it can be simpler:
>
> set the hilitedButton of the long id of me to tNum
>
> I didn't do it from an openStack script, but from the message box while on
> another card.
>
> Thanks,
> Brian
>
> On Fri, Mar 9, 2018 at 8:10 PM Peter Bogdanoff via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Yes, it works great if you are on the card, not if you are somewhere
> else.
> >
> >
> > > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Nevermind. Another card. DOH
> > >
> > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner 
> wrote:
> > >
> > >> What version?  Its working for me in 9 dp11 by using either dispatch
> or
> > >> send to the group.
> > >>
> > >> In the group:
> > >> command doit pbtn
> > >>   set the hilitedbutton of me to pbtn
> > >> end doit
> > >>
> > >> And from the message box..
> > >>
> > >> send ("doit" && 2) to group 1
> > >> or
> > >> dispatch "doit" to group 1 with 3
> > >>
> > >>
> > >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode <
> > >> use-livecode@lists.runrev.com> wrote:
> > >>
> > >>> I learned something today.
> > >>>
> > >>> I was trying by script to set the hilite of a radio button in a group
> > on
> > >>> another card.
> > >>>
> > >>> My script is in the group “Language Choice” which is called by
> > openStack.
> > >>> I’m thinking that “me” would operate on the group:
> > >>>
> > >>>set the hilitedButton of me to tNum
> > >>>
> > >>> Didn’t work, even though the script received the message and
> completed.
> > >>> The radio buttons were unchanged. I modified it to this, which
> worked:
> > >>>
> > >>>set the hilitedButton of group "Language Choice" of card
> > >>> "Settings" to tNum
> > >>>
> > >>>
> > >>> I can only think that, a group, even though it is on a single card
> and
> > >>> does not have its backgroundBehavior set to true, must be referred to
> > >>> explicitly by the name of the group and the name of the card is
> > resides in.
> > >>> Or maybe it’s because the individual buttons didn't have sharedHilite
> > set
> > >>> to true.
> > >>>
> > >>> Peter Bogdanoff
> > >>> ArtsInteractive
> > >>>
> > >>>
> > >>> ___
> > >>> use-livecode mailing list
> > >>> use-livecode@lists.runrev.com
> > >>> Please visit this url to subscribe, unsubscribe and manage your
> > >>> subscription preferences:
> > >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> > >>
> > >>
> > >>
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode