Re: [PD] not resolving dollar in arguments : is it possible ?

2018-06-19 Thread IOhannes m zmoelnig
On 2018-06-19 15:45, IOhannes m zmoelnig wrote:
> so eventually, i could be talked into implementing support for setting
> (unescaped and escaped) and getting (unexpanded and expanded) $args for
> [canvasargs].
> mainly i'll have to find a nice API to expose that functionality on the
> patch level.

doh.

actually, i've already implemented getting the expanded and unexpanded
$args after a bug reported by liam [7].

so i only need a nice way to be able to set $args.

probably the default (list) message, should unescape any dollars before
saving them (so a [list $ 0(->[list $1$2(->[canvasargs] would set the
first argument to be a $0 (the $zero from the parent patch), and an
expanded "raw" message would save the escapes (so [list $ 0(->[raw
$1$2(->[canvasargs] would actually become [myabs \$0].

i also think that any $arg returned should be a proper symbol, rather
than an A_DOLLSYM or simile.

sorry for all the noise.
gfmasdr
IOhannes


[7] https://github.com/iem-projects/pd-iemguts/issues/7



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] not resolving dollar in arguments : is it possible ?

2018-06-19 Thread IOhannes m zmoelnig
On 2018-06-19 10:03, Raphaël Ilias wrote:
> Hello !
> 
> I'll try to ask this in a few words :
> 
> is it possible to dynamically save a $n-symbol as an argument in an
> abstraction, like you can do with [iemguts/canvasargs] but without
> "resolving" the $n index declaration ?
> 
> The idea would be to reproduce a properties panel as with iem GUIs, and be
> able to put in symbol boxes, a  $0-receiverSymbolicName or
> $1-$2-senderSymbolicName and save it as argument ?
> 
> I am trying various tricks, but unsuccessfully, see both attached patch...
> 
> if someone has a idea or even a solution !
> or thinks it's stupid

hmm, indeed i don't think that this is possible.
the only way to create $args with [canvasargs] i've found until now, is
to reuse-those retrieved via [canvasargs] itself.

that is, if you have an abstraction [foo $1] you can use something like
the following to add a second argument "bar", while keeping the first
one a $arg.

[bang(
|
[canvasargs]
|
[list $1 bar(
|
[canvasargs]

however, anything more complicated doesn't work.

now [canvasargs] behaves a little bit weird with $args anyhow.
if the args are queried, and $arg is output as an unexpanded dollararg
(A_DOLLAR, A_DOLLSYM), that's why it's printed as "$0-foo" rather than
the usual "\$0-foo", or an expanded "1046-foo".
this weird types are what makes the above observation actually work
(being able to set $args when taken from the output of [canvasargs]),
but apart from that they lead to weirdo behaviour (e.g. [list
fromsymbol] simply crashes).

so eventually, i could be talked into implementing support for setting
(unescaped and escaped) and getting (unexpanded and expanded) $args for
[canvasargs].
mainly i'll have to find a nice API to expose that functionality on the
patch level.



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] not resolving dollar in arguments : is it possible ?

2018-06-19 Thread Liam Goodacre
Do I understand correctly that you're trying to get the symbol "$0" or $1" into 
a list without it being interpreted? If so, then this should do it.

[list $ 0 (
|
[$1$2-argument (

From: Pd-list  on behalf of Raphaël Ilias 

Sent: 19 June 2018 09:03
To: pd-list
Subject: [PD] not resolving dollar in arguments : is it possible ?

Hello !

I'll try to ask this in a few words :

is it possible to dynamically save a $n-symbol as an argument in an 
abstraction, like you can do with [iemguts/canvasargs] but without "resolving" 
the $n index declaration ?

The idea would be to reproduce a properties panel as with iem GUIs, and be able 
to put in symbol boxes, a  $0-receiverSymbolicName or $1-$2-senderSymbolicName 
and save it as argument ?

I am trying various tricks, but unsuccessfully, see both attached patch...

if someone has a idea or even a solution !
or thinks it's stupid

have a nice day !

--
Raphaël Ilias
  ___
 phae.fr
 17 places des Halles - Ingrandes
 49123 Ingrandes Le Fresne s/ Loire
 phae.il...@gmail.com / +33 (0) 6 04 45 79 78
  ___
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list