[PD] Local Variables in GUI Properties (receive-symbol)

2010-04-13 Thread Mathieu Bouchard


i'm pretty sure they can - if they don't know about it... the problem 
only comes from the property editor (call it a bug) which eats the 
dollargs in order to prevent Pd and/or tcl to expand the $variables.


In both directions, literal dollarsigns can be transmitted by prefixing 
them by backslashes. It is something that is in both the Pd file format 
grammar, and the Tcl file format grammar. It's just not used by IEMGUI.


Because of this, I replace # by a sharpsign prior to using it in a label 
message. It works, but it's visibly not the same character, which has a 
different shear to it, and has a wholly different size... looks like 
superscript or subscript.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-27 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben Baker-Smith wrote:
 Fantastic, that did the trick. I'll keep my variables as prefixes from now on.
 
 Though ideally the gui objects should handle variables in the same way
 as standard send and receive objects (and arrays), which can take
 variables at the beginning, end, or in the middle.

i'm pretty sure they can - if they don't know about it...
the problem only comes from the property editor (call it a bug) which
eats the dollargs in order to prevent Pd and/or tcl to expand the
$variables.

if you can set the sender/receiver names without the property editor,
then you can also have proper dollarg expansion (you probably should
not save the patch though...)


fgasdm
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkutyi8ACgkQkX2Xpv6ydvR2OgCgwPe0vo1sGGZjiLmFJeUCcLfB
2HIAoNLfwmsp/Q9zhohpXvMsS4IxBkfJ
=U4mu
-END PGP SIGNATURE-

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-27 Thread Matteo Sisti Sette

Wow, this is crazy!!!

It works fine with $1, $2,..., i.e. you can use them in gui properties 
at the end, beginning, middle, wherever you want and doing it with the 
properties editor - the only weirdness is that when you re-open the 
properties dialog the $ will be replaced by a #, but everything works 
fine. I've been doing this for years (since 0.40 you can put them in the 
middle and use multiple dollars in a symbol, at least as object creation 
arguments).


However, the $0 is not handled properly. It is immediately interpreted 
and becomes a 0, as Ben described.



I use $n's a lot, both as object creation arguments and as gui object 
properties, and not only as prefix, but I never noticed this because I 
usually don't use $0 in gui properties and whenever I use $0 it is 
usually as a prefix...



This is definitely a bug: there's no reason why $0 should be treated 
differently than $n with n0.




--
Matteo Sisti Sette
matteosistise...@gmail.com
http://www.matteosistisette.com

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-27 Thread Roman Haefeli
On Sat, 2010-03-27 at 14:30 +0100, Matteo Sisti Sette wrote:

 However, the $0 is not handled properly. It is immediately interpreted 
 and becomes a 0, as Ben described.

If it would be interpreted, the number would be = 1000, but not 0.
AFAIK, $0-counting starts at 1000.

 This is definitely a bug: there's no reason why $0 should be treated 
 differently than $n with n0.

my words.

Roman



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-27 Thread Matteo Sisti Sette

Roman Haefeli escribió:

On Sat, 2010-03-27 at 14:30 +0100, Matteo Sisti Sette wrote:

However, the $0 is not handled properly. It is immediately interpreted 
and becomes a 0, as Ben described.


If it would be interpreted, the number would be = 1000, but not 0.
AFAIK, $0-counting starts at 1000.



Whops, you're right, sorry.

Then something really funny happens with $0!

--
Matteo Sisti Sette
matteosistise...@gmail.com
http://www.matteosistisette.com

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben Baker-Smith wrote:
 Hello,
 
 Is there a way to use local variables ($0) in GUI send-symbol /
 receive-symbol properties? If I just put in $0 it interprets it as
 0, 

this is new to me; i have been using $0 in gui-objects for ages.

 and I can't set it after creation because there will be multiple

you can: just connect(! with patch cords) the re-naming message to the
object, and you are done.
but you really shouldn't need it, see above

fgmsdr
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkusx80ACgkQkX2Xpv6ydvQTuwCgiWKupLmE0NpsSpExmUjLq7nQ
kNUAoPKVzgh5wJep19k5o2YAD78UHvBX
=/Pkf
-END PGP SIGNATURE-

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread Ben Baker-Smith
 Ben Baker-Smith wrote:
 Hello,

 Is there a way to use local variables ($0) in GUI send-symbol /
 receive-symbol properties? If I just put in $0 it interprets it as
 0,

 this is new to me; i have been using $0 in gui-objects for ages.


Not sure what the issue is then. I'm using Pd-Extended 0.41.4 on Mac
OS 10.4.11 (PPC), at the moment.

I've tested this with toggle, bang, and canvas objects. If I put $0 in
the send or receive properties everything looks fine until i close and
re-open properties, then test-send-$0 becomes test-send-0 and
testreceive$0 becomes testreceive0. At no point (before or after
closing / re-opening properties) will the objects send or receive $0
properly.

 and I can't set it after creation because there will be multiple

 you can: just connect(! with patch cords) the re-naming message to the
 object, and you are done.
 but you really shouldn't need it, see above


I can't do it this way in my current patch because I am using canvas
objects, and they don't have inlets with which to connect patch cords.

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread tim vets
2010/3/26 Ben Baker-Smith bbakersm...@gmail.com

  Ben Baker-Smith wrote:
  Hello,
 
  Is there a way to use local variables ($0) in GUI send-symbol /
  receive-symbol properties? If I just put in $0 it interprets it as
  0,
 
  this is new to me; i have been using $0 in gui-objects for ages.
 

 Not sure what the issue is then. I'm using Pd-Extended 0.41.4 on Mac
 OS 10.4.11 (PPC), at the moment.

 I've tested this with toggle, bang, and canvas objects. If I put $0 in
 the send or receive properties everything looks fine until i close and
 re-open properties, then test-send-$0 becomes test-send-0 and
 testreceive$0 becomes testreceive0. At no point (before or after
 closing / re-opening properties) will the objects send or receive $0
 properly.



how about $0-test-send instead of test-send-$0 ?

gr,
Tim




  and I can't set it after creation because there will be multiple
 
  you can: just connect(! with patch cords) the re-naming message to the
  object, and you are done.
  but you really shouldn't need it, see above
 

 I can't do it this way in my current patch because I am using canvas
 objects, and they don't have inlets with which to connect patch cords.

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread Roman Haefeli
On Fri, 2010-03-26 at 11:22 -0500, Ben Baker-Smith wrote:
  Ben Baker-Smith wrote:
  Hello,
 
  Is there a way to use local variables ($0) in GUI send-symbol /
  receive-symbol properties? If I just put in $0 it interprets it as
  0,
 
  this is new to me; i have been using $0 in gui-objects for ages.
 
 
 Not sure what the issue is then. I'm using Pd-Extended 0.41.4 on Mac
 OS 10.4.11 (PPC), at the moment.
 
 I've tested this with toggle, bang, and canvas objects. If I put $0 in
 the send or receive properties everything looks fine until i close and
 re-open properties, then test-send-$0 becomes test-send-0 and
 testreceive$0 becomes testreceive0. At no point (before or after
 closing / re-opening properties) will the objects send or receive $0
 properly.

I've got the same behaviour and I even haven't noticed it, since I've
always put the $0 as the prefix, not as the suffix. Try $0testreceive,
which should work. 

In older Pd versions you weren't allowed to put dollar variables in the
middle or at the end of symbols, but only at the beginning. This was
changed to allow dollar variables at any place and also to have even
more than one dollar variable in one symbol. It seems, that it is not
working properly in the iemguis. any other dollar variable than $0 seems
to work at the end. Also $0 works at the end, if you use # instead:
testreceive#0. I think, this is a bug.

Roman
 


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread Derek Holzer
$0, $1 and all other variables should be at the beginning of the name  
of your variable, not the end. This is the same whether it's a send,  
an array or anything else.


D.

On 3/26/10 5:22 PM, Ben Baker-Smith wrote:


I've tested this with toggle, bang, and canvas objects. If I put $0 in
the send or receive properties everything looks fine until i close and
re-open properties, then test-send-$0 becomes test-send-0 and
testreceive$0 becomes testreceive0. At no point (before or after
closing / re-opening properties) will the objects send or receive $0
properly.



--
::: derek holzer ::: http://macumbista.net :::
---Oblique Strategy # 23:
Breathe more deeply



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread Roman Haefeli
On Fri, 2010-03-26 at 18:01 +0100, Derek Holzer wrote:
 $0, $1 and all other variables should be at the beginning of the name  
 of your variable, not the end. This is the same whether it's a send,  
 an array or anything else.

Not anymore in recent versions of Pd, at least not in = 0.42.

Roman



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Local Variables in GUI Properties (receive-symbol)

2010-03-26 Thread Ben Baker-Smith
Fantastic, that did the trick. I'll keep my variables as prefixes from now on.

Though ideally the gui objects should handle variables in the same way
as standard send and receive objects (and arrays), which can take
variables at the beginning, end, or in the middle.

Thanks everyone!

On Fri, Mar 26, 2010 at 12:01 PM, Derek Holzer de...@umatic.nl wrote:
 $0, $1 and all other variables should be at the beginning of the name of
 your variable, not the end. This is the same whether it's a send, an array
 or anything else.

 D.

 On 3/26/10 5:22 PM, Ben Baker-Smith wrote:

 I've tested this with toggle, bang, and canvas objects. If I put $0 in
 the send or receive properties everything looks fine until i close and
 re-open properties, then test-send-$0 becomes test-send-0 and
 testreceive$0 becomes testreceive0. At no point (before or after
 closing / re-opening properties) will the objects send or receive $0
 properly.


 --
 ::: derek holzer ::: http://macumbista.net :::
 ---Oblique Strategy # 23:
 Breathe more deeply




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Local Variables in GUI Properties (receive-symbol)

2010-03-25 Thread Ben Baker-Smith
Hello,

Is there a way to use local variables ($0) in GUI send-symbol /
receive-symbol properties? If I just put in $0 it interprets it as
0, and I can't set it after creation because there will be multiple
copies of the abstraction present in a patch and I don't want them all
to be set to the same local variable (kinda defeats the point). I
can't use an external send/receive object because I'm using canvases,
which don't have inlets or outlets.

Thanks,

-Ben

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list