[comp.sys.mac.hypercard] non-text in a field

range@cisunx.UUCP (Tim Birus) (08/01/88)

	Is is possible to enter non-text into a field?  Specifically, I
wish to put some sort of Macpaint picture or an icon into a field then
maybe delete it from a field and move it to another.  

Thanks.

boz@eleazar.dartmouth.edu (John Boswell) (08/02/88)

You could simply use a font such as ICON or MISCPIX, etc., which are
simply bitmapped pictures/ icons.  They can easily be transfered...
the new field simply needs to use the same font.

John Boswell
Dept. of Chemistry
Dartmouth College
boz@eleazar.dartmouth.edu

dan@Apple.COM (Dan Allen) (08/07/88)

In article <11375@cisunx.UUCP> range@cisunx.UUCP (Tim Birus) writes:
>	Is is possible to enter non-text into a field?  Specifically, I
>wish to put some sort of Macpaint picture or an icon into a field then
>maybe delete it from a field and move it to another.  

Specifically, No.  You can, however, have a graphic specific to a card
that sort of "overlays" fields, which perhaps may give the same effect.
You can also write HyperTalk scripts that can manipulate the graphics.

Dan Allen
Apple Computer

wb1j+@andrew.cmu.edu (William M. Bumgarner) (08/08/88)

>> Is is possible to enter non-text into a field?  Specifically, I
>> wish to put some sort of Macpaint picture or an icon into a field then
>> maybe delete it from a field and move it to another.

No can do.  Fields can <currently> only contain 29,997 characters of text of
only one font/size/style.

Your best bet is to define a region on the card as being your picture area
[This is completely for the sake of ease of scripting], and then use doMenu
copy and doMenu paste picture to copy/paste pictures in and out of the region.
Be careful when pasting-- Hypercard has a Paste Picture/Paste Text menu option
depending on the type of the clipboard.....  if you do the wrong one at the
wrong time (paste text when the clip holds a picture), your script will die
with a 'menu option not found' error.  I ran into this and fixed it by writing
an XFCN that checks the type of the clipboard.

b.bum
wb1j+@andrew.cmu.edu

mark@pnet06.cts.com (Mark Murphy) (08/12/88)

wb1j+@andrew.cmu.edu (William M. Bumgarner) writes:
>>> Is is possible to enter non-text into a field?  Specifically, I
>>> wish to put some sort of Macpaint picture or an icon into a field then
>>> maybe delete it from a field and move it to another.
>
>No can do.  Fields can <currently> only contain 29,997 characters of text of
>only one font/size/style.
>
>Your best bet is to define a region on the card as being your picture area
>[This is completely for the sake of ease of scripting], and then use doMenu
>copy and doMenu paste picture to copy/paste pictures in and out of the region.
>Be careful when pasting-- Hypercard has a Paste Picture/Paste Text menu option
>depending on the type of the clipboard.....  if you do the wrong one at the
>wrong time (paste text when the clip holds a picture), your script will die
>with a 'menu option not found' error.  I ran into this and fixed it by writing
>an XFCN that checks the type of the clipboard.
>
>b.bum
>wb1j+@andrew.cmu.edu

   Actually, it is possible to have picture like objects or icons within
fields and buttons.  Since fonts are nothing more than bit images, take the
picture or icon you want and create a font (let's call it pictFont).  All that
is needed now is to move pictFont into your system, hypercard, home card, or
stack.  Then create a new field with the pictFont as the font.  Choose the
font size you created the pictFont in, and use the plain style.  This will
yeild a picture where the black pixels are drawn and the white pixels are
transparent.   With this basic concept in mind, try to do some nifty tricks
such as changing font styles, sizes, etc.
   If you want the black and white pixels to be drawn, there are several
tricks that must be done.  One of the users at our HyperCard SIG inverted his
picture, then put it into a font.  Once used in HC, he set the style of his
font to outline.  This inverted the already inverted picture to yield a
positive result.
   It is difficult to explain within this post, but I think you may get the
general idea.  Hope this helps....


Mark Murphy, Tyrell Co.                 UUCP: {crash uunet}!pnet06!mark
Voice: (714) 491-8110                   ARPA: crash!pnet06!mark@nosc.mil
The Desktop BBS: (714) 491-1003         INET: mark@pnet06.cts.com