Block Arguments

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Block Arguments

Dan Norton
Hi Juan,

On windows, when the attached class method is added to StrikeFont and cmd-d is done on the comment, it produces:

'Error: This block accepts 0 arguments, but was called with 1 argument.'

AFAIKT it is not passing any arguments and the files do exist. Maybe a bug?

 - Dan

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

StrikeFont class-createTrueTypebolditalicboldItalic.zip (856 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Block Arguments

Phil B
On Thu, 2015-07-16 at 21:43 -0400, Dan Norton wrote:

> Hi Juan,
>
>
> On windows, when the attached class method is added to StrikeFont and
> cmd-d is done on the comment, it produces:
>
>
> 'Error: This block accepts 0 arguments, but was called with 1
> argument.'
>
>
> AFAIKT it is not passing any arguments and the files do exist. Maybe a
> bug?
>
But it is passing an argument to your ifExistsDo: block (the filestream)
and your block doesn't accept any.  If you don't care about the
filestream, change your blocks to [:filestream| {baseName. ' OK'} print]
etc. and ignore the parameter.

>
>  - Dan
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Block Arguments

Dan Norton
On 16 Jul 2015 at 22:11, Phil (list) wrote:

> On Thu, 2015-07-16 at 21:43 -0400, Dan Norton wrote:
> > Hi Juan,
> >
> >
> > On windows, when the attached class method is added to StrikeFont
> and
> > cmd-d is done on the comment, it produces:
> >
> >
> > 'Error: This block accepts 0 arguments, but was called with 1
> > argument.'
> >
> >
> > AFAIKT it is not passing any arguments and the files do exist.
> Maybe a
> > bug?
> >
> But it is passing an argument to your ifExistsDo: block (the
> filestream)
> and your block doesn't accept any.  If you don't care about the
> filestream, change your blocks to [:filestream| {baseName. ' OK'}
> print]
> etc. and ignore the parameter.
>

Ahh, now I see it. Interesting. Thanks, Phil.

 - Dan

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org