tabbing glitch

View: New views
7 Messages — Rating Filter:   Alert me  

tabbing glitch

by JostM :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sheet({arg w;

            GUI.textView.new(w,Rect(0,0,244,30));
            w.startRow;
            GUI.button.new(w,Rect(0,0,244,30))
                .states_([["test"]]);
            w.startRow;
            GUI.button.new(w,Rect(0,0,244,30))
                .states_([["test"]]);
            w.startRow;
            GUI.button.new(w,Rect(0,0,244,30))
                .states_([["test"]]);
            w.startRow;
           
       
});

the second item is always skipped when you hit tab


jostM
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

merging dictionaries

by koonce :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


What is the simplest way to merge IdentityDictionaries, with different
keys, into one?

Paul Koonce


_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: merging dictionaries

by Josh Parmenter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There doesn't seem to be a merge-like method... would something like  
this work?

a = IdentityDictionary.new;
a.add(\a -> 1)
a.add(\b -> 1)
a.add(\c -> 1)

b = IdentityDictionary.new;
b.add(\d -> 1)
b.add(\e -> 1)
b.add(\f -> 1)

c = IdentityDictionary.new;

[b, a].do({arg aID; // the IdentityDictionary
        aID.keysValuesDo({arg key, val; // parse through its keys and values
                c.add(key -> val)
                })
        })

c;

Best,

Josh

On Feb 22, 2008, at 6:57 PM, koonce@... wrote:

>
> What is the simplest way to merge IdentityDictionaries, with different
> keys, into one?
>
> Paul Koonce
>
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users

******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own  
interpretation of how modern society is structured: whether actively  
or passively, consciously or unconsciously, he makes choices in this  
regard. He may be conservative or he may subject himself to continual  
renewal; or he may strive for a revolutionary, historical or social  
palingenesis." - Luigi Nono
*/

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: merging dictionaries

by koonce :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks. That's pretty much what I came up with as well, except that I used
associationDo which transfers the key and value together.

addAll only accepts arrays of associations and I can't see how to demote a
dictionary into an array of associations.

PAUL




On Fri, 22 Feb 2008, Josh Parmenter wrote:

> There doesn't seem to be a merge-like method... would something like
> this work?
>
> a = IdentityDictionary.new;
> a.add(\a -> 1)
> a.add(\b -> 1)
> a.add(\c -> 1)
>
> b = IdentityDictionary.new;
> b.add(\d -> 1)
> b.add(\e -> 1)
> b.add(\f -> 1)
>
> c = IdentityDictionary.new;
>
> [b, a].do({arg aID; // the IdentityDictionary
> aID.keysValuesDo({arg key, val; // parse through its keys and values
> c.add(key -> val)
> })
> })
>
> c;
>
> Best,
>
> Josh
>
> On Feb 22, 2008, at 6:57 PM, koonce@... wrote:
>
>>
>> What is the simplest way to merge IdentityDictionaries, with different
>> keys, into one?
>>
>> Paul Koonce
>>
>>
>> _______________________________________________
>> sc-users mailing list
>> sc-users@...
>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
> ******************************************
> /* Joshua D. Parmenter
> http://www.realizedsound.net/josh/
>
> “Every composer – at all times and in all cases – gives his own
> interpretation of how modern society is structured: whether actively
> or passively, consciously or unconsciously, he makes choices in this
> regard. He may be conservative or he may subject himself to continual
> renewal; or he may strive for a revolutionary, historical or social
> palingenesis." - Luigi Nono
> */
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: merging dictionaries

by blackrain-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

putAll works.

cheers,

x

On Fri, Feb 22, 2008 at 9:40 PM,  <koonce@...> wrote:

>
>  Thanks. That's pretty much what I came up with as well, except that I used
>  associationDo which transfers the key and value together.
>
>  addAll only accepts arrays of associations and I can't see how to demote a
>  dictionary into an array of associations.
>
>  PAUL
>
>
>
>
>
>
>  On Fri, 22 Feb 2008, Josh Parmenter wrote:
>
>  > There doesn't seem to be a merge-like method... would something like
>  > this work?
>  >
>  > a = IdentityDictionary.new;
>  > a.add(\a -> 1)
>  > a.add(\b -> 1)
>  > a.add(\c -> 1)
>  >
>  > b = IdentityDictionary.new;
>  > b.add(\d -> 1)
>  > b.add(\e -> 1)
>  > b.add(\f -> 1)
>  >
>  > c = IdentityDictionary.new;
>  >
>  > [b, a].do({arg aID; // the IdentityDictionary
>  >       aID.keysValuesDo({arg key, val; // parse through its keys and values
>  >               c.add(key -> val)
>  >               })
>  >       })
>  >
>  > c;
>  >
>  > Best,
>  >
>  > Josh
>  >
>  > On Feb 22, 2008, at 6:57 PM, koonce@... wrote:
>  >
>  >>
>  >> What is the simplest way to merge IdentityDictionaries, with different
>  >> keys, into one?
>  >>
>  >> Paul Koonce
>  >>
>  >>
>  >> _______________________________________________
>  >> sc-users mailing list
>  >> sc-users@...
>  >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>  >
>  > ******************************************
>  > /* Joshua D. Parmenter
>  > http://www.realizedsound.net/josh/
>  >
>  > "Every composer – at all times and in all cases – gives his own
>  > interpretation of how modern society is structured: whether actively
>  > or passively, consciously or unconsciously, he makes choices in this
>  > regard. He may be conservative or he may subject himself to continual
>  > renewal; or he may strive for a revolutionary, historical or social
>  > palingenesis." - Luigi Nono
>  > */
>  >
>  > _______________________________________________
>  > sc-users mailing list
>  > sc-users@...
>  > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>  >
> _______________________________________________
>  sc-users mailing list
>  sc-users@...
>  http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
>
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: merging dictionaries

by james mccartney :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

you can use inheritance.

x = (a: 1, b: 2, c: 3);
y = (d: 7, e: 8, f: 9);
z = (parent: x, proto: y);
z.b.postln;
z.e.postln;


On Fri, Feb 22, 2008 at 6:57 PM,  <koonce@...> wrote:

>
>  What is the simplest way to merge IdentityDictionaries, with different
>  keys, into one?
>
>  Paul Koonce
>
>
>  _______________________________________________
>  sc-users mailing list
>  sc-users@...
>  http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>



--
--- james mccartney
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: merging dictionaries

by koonce :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Yes it does! Thanks.

PAUL



On Fri, 22 Feb 2008, blackrain wrote:

> putAll works.
>
> cheers,
>
> x
>
> On Fri, Feb 22, 2008 at 9:40 PM,  <koonce@...> wrote:
>>
>>  Thanks. That's pretty much what I came up with as well, except that I used
>>  associationDo which transfers the key and value together.
>>
>>  addAll only accepts arrays of associations and I can't see how to demote a
>>  dictionary into an array of associations.
>>
>>  PAUL
>>
>>
>>
>>
>>
>>
>>  On Fri, 22 Feb 2008, Josh Parmenter wrote:
>>
>> > There doesn't seem to be a merge-like method... would something like
>> > this work?
>> >
>> > a = IdentityDictionary.new;
>> > a.add(\a -> 1)
>> > a.add(\b -> 1)
>> > a.add(\c -> 1)
>> >
>> > b = IdentityDictionary.new;
>> > b.add(\d -> 1)
>> > b.add(\e -> 1)
>> > b.add(\f -> 1)
>> >
>> > c = IdentityDictionary.new;
>> >
>> > [b, a].do({arg aID; // the IdentityDictionary
>> >       aID.keysValuesDo({arg key, val; // parse through its keys and values
>> >               c.add(key -> val)
>> >               })
>> >       })
>> >
>> > c;
>> >
>> > Best,
>> >
>> > Josh
>> >
>> > On Feb 22, 2008, at 6:57 PM, koonce@... wrote:
>> >
>> >>
>> >> What is the simplest way to merge IdentityDictionaries, with different
>> >> keys, into one?
>> >>
>> >> Paul Koonce
>> >>
>> >>
>> >> _______________________________________________
>> >> sc-users mailing list
>> >> sc-users@...
>> >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>> >
>> > ******************************************
>> > /* Joshua D. Parmenter
>> > http://www.realizedsound.net/josh/
>> >
>> > "Every composer – at all times and in all cases – gives his own
>> > interpretation of how modern society is structured: whether actively
>> > or passively, consciously or unconsciously, he makes choices in this
>> > regard. He may be conservative or he may subject himself to continual
>> > renewal; or he may strive for a revolutionary, historical or social
>> > palingenesis." - Luigi Nono
>> > */
>> >
>> > _______________________________________________
>> > sc-users mailing list
>> > sc-users@...
>> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>> >
>> _______________________________________________
>>  sc-users mailing list
>>  sc-users@...
>>  http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>>
>>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users