Re: [racket-users] Finding non-text elements

2017-11-07 Thread Robby Findler
On Tue, Nov 7, 2017 at 1:52 PM, David Van Horn  wrote:
> On Tue, Nov 7, 2017 at 2:45 PM, Robby Findler
>  wrote:
>> On Tue, Nov 7, 2017 at 1:42 PM, David Van Horn  wrote:
>>> Other than copy/pasting, I can seem to recreate a decimal-looking
>>> number that is actually a special fraction, so I'm not sure how the
>>> author of the file accomplished this.
>>
>> They couldn't have copied and pasted from the interactions window?
>
> Ah yes, this is it.  If I run 1.2, I get 1.2 in the interactions
> window as a special fraction (that renders as 1.2).
>
> So they're running their programs to figure out their test cases :)

How dare they! :)

Robby

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Finding non-text elements

2017-11-07 Thread Robby Findler
On Tue, Nov 7, 2017 at 1:42 PM, David Van Horn  wrote:
> Thanks, I found the elements by using wxme-port->port and
> read-char-or-special until I found something special and it turns out
> it was caused by fractions.
>
> There are a couple weird things: (1) wxme-read reads them as numbers,
> not specials, and

Yes, that's because they have special support in there for them.

> (2) the "fractions" are actually rendered in decimal
> form in the file when I open it in DrRacket, which is why I didn't
> spot them by looking at the file (now that I know where they are, I
> can see they're special because cursor moves past the entire number
> "71.25" as though it's a single character).

You can also right click on them, I presume?

> But if I
> read-char-or-special on them, I get back something rendered as a
> fraction.  Maybe this has something to do with a difference in
> preferences between me and the author of the file?

I'm not sure about that.

> Other than copy/pasting, I can seem to recreate a decimal-looking
> number that is actually a special fraction, so I'm not sure how the
> author of the file accomplished this.

They couldn't have copied and pasted from the interactions window?

Robby

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Finding non-text elements

2017-11-07 Thread Robby Findler
I believe this is the place that does the check:

 
https://github.com/racket/gui/blob/master/gui-lib/framework/private/text.rkt#L2300

Possibly some printfs in and around there would help?

Robby


On Tue, Nov 7, 2017 at 1:03 PM, David Van Horn  wrote:
> I have some ISL+ programs that are being saved in the WXME format, but
> I can't seem to find any element in the file that would trigger this
> format (no images, comment boxes, etc.).
>
> Is there some way to figure out why the files are being saved this way
> in DrRacket?
>
> Thanks,
> David
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.