problem displaying a bitmap

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...

problem displaying a bitmap

Postby Stu on Sat Oct 01, 2016 6:32 pm

A while back, some contributors to this Forum showed me this function to display bitmaps:

disp bits
'bm'⎕WC'bitmap'('Bits'bits)('Cmap'(2 3⍴fill,line))
'f'⎕WC'form'('Picture' 'bm')

It worked for a while, but now when I try to launch Dyalog with any WS containing this function definition, I get the message "The following objects could not be rebuilt: #bm".
If I close the window containing the message, the interpreter comes up and I can proceed; however, if I then attempt to use disp, I get a DOMAIN ERROR:

DOMAIN ERROR
disp[2] 'f'⎕WC'form'('Picture' 'bm')

What is going on here?
Stu
 
Posts: 97
Joined: Thu Dec 31, 2015 1:30 am

Re: problem displaying a bitmap

Postby Vince|Dyalog on Mon Oct 03, 2016 12:23 pm

Hi Stu,

1) There is a saved GUI object BM in the workspace. The message "The following objects could not be rebuilt: #bm" means that bm was not created with KeepBits set to 1. To avoid this message, you could create bm with ('KeepBits' 1) set or you could ⎕EX 'bm' before you save the workspace.

2) After you get the domain error, can you tell me what is in ⎕DMX with the following please?

      ⎕DMX.(⍪{⍵(⍎⍵)}¨⎕NL-2)


Could you email the results and your workspace to me at Dyalog Support please?

Regards,

Vince
Vince|Dyalog
 
Posts: 335
Joined: Wed Oct 01, 2008 9:39 am

Re: problem displaying a bitmap

Postby Stu on Wed Oct 05, 2016 5:48 pm

Vince figured this out. First I did the things he suggested in his initial reply. He then found that he couldn't reproduce the problem with my workspace and suggested I try the following:

1) Add the ('KeepBits' 1) to the bitmap ⎕WC line.

2) splitting up the line to see which part generates the domain error:
'f'⎕WC'form'
'f'⎕WS('Picture' 'bm')

It turned out that the first line was the culprit: something was wrong with 'f'. I ⎕EX'd f at Vince's suggestion and then saved the workspace. Voila! Problem solved.

I think I shot myself in the foot here by naming some temporarily useful function 'f'. I should have given it a name related to its purpose even though I intended (but forgot) to erase it right after I got whatever information I wanted, which I can't even remember now.
Stu
 
Posts: 97
Joined: Thu Dec 31, 2015 1:30 am


Return to New to Dyalog?

Who is online

Users browsing this forum: No registered users and 1 guest