I made the example code in Ivib following 'An IVIB Primer'(2001),
Ivib made the unicon code with main.icn, help.icn and about.icn.

When compiled and linked the codes as
:\>unicon -G main. icn help.icn and about.icn

The message is returned:

Parsing main.icn: ..fatal: can't read spec for class _Dialog

 And the contents is different between the paper 'An IVIB Primer(2001)'  and
book <http://unicon.sourceforge.net/book/ub.pdf>.
such as

"class dialogmian : Dialog(...) " in book, but "class dialogmain : _Dialog"
in 'An IVIB Primer(2001)'

What is the matter?

Song



The codes is
------------ main.icn ------------

class dialogmain : _Dialog(exit_menu_item, aboutt_menu_item, help_menu_item,
ListBtn, MsgBox)
   method handle_exit_menu_item(ev)
         dispose()
   end

   method handle_aboutt_menu_item(ev)
         dialog().show_modal()
   end

   method handle_help_menu_item(ev)
         dialoghelp().show_modal()
   end

   method handle_ListBtn(ev)
   end

   method handle_default(ev)
   end

   method dialog_event(ev)
      case ev.get_component() of {
         exit_menu_item : handle_exit_menu_item(ev)
         aboutt_menu_item : handle_aboutt_menu_item(ev)
         help_menu_item : handle_help_menu_item(ev)
         ListBtn : handle_ListBtn(ev)
         exit_menu_item : handle_exit_menu_item(ev)
         aboutt_menu_item : handle_aboutt_menu_item(ev)
         help_menu_item : handle_help_menu_item(ev)
         ListBtn : handle_ListBtn(ev)
         default : handle_default(ev)
      }
   end

   method init_dialog()
   end

   method end_dialog()
   end

   method handle_exit_menu_item(ev)
   end

   method handle_aboutt_menu_item(ev)
   end

   method handle_help_menu_item(ev)
   end

   method handle_ListBtn(ev)
   end

   method setup()
      local menu_bar, file_menu, help_menu
      self.set_attribs("size=644,399", "bg=yellowish white")
      menu_bar := MenuBar()
      menu_bar$set_pos("0", "0")
      file_menu := Menu()
      file_menu$set_label("File")
      file_menu$set_label_left("(F)")
      exit_menu_item := TextMenuItem()
      exit_menu_item$set_label("Exit")
      file_menu$add(exit_menu_item)
      menu_bar$add(file_menu)
      help_menu := Menu()
      help_menu$set_label("Help")
      aboutt_menu_item := TextMenuItem()
      aboutt_menu_item$set_label("About...")
      help_menu$add(aboutt_menu_item)
      help_menu_item := TextMenuItem()
      help_menu_item$set_label("Help")
      help_menu$add(help_menu_item)
      menu_bar$add(help_menu)
      self$add(menu_bar)
      ListBtn := TextButton()
      ListBtn$set_pos("22", "58")
      ListBtn$set_size("84", "20")
      ListBtn$set_label("List Files")
      ListBtn$set_internal_alignment("c")
      self$add(ListBtn)
      MsgBox := Label()
      MsgBox$set_pos(0, 48)
      MsgBox$set_size("632", "309")
      MsgBox$set_attribs("fg=red", "font=serif,19,bold")
      MsgBox$set_internal_alignment("l")
      MsgBox$set_label("")
      self$add(MsgBox)
   end

   method component_setup()
      self.setup()
   end

   initially
      self$_Dialog.initially()
end

procedure main()
   local d
   dialogmian().show_modal()
end



### Ivib layout ###
#class|Canvas|16|Name
Table|table|integer|0|5|string|label|integer|1|string|menu|integer|2|string|
menu_bar|integer|1|string|text_button|integer|1|string|text_menu_item|intege
r|3|Button Groups|class|ButtonGroupSet|2|Parent
Canvas|1|Boxes|list|0|Checkbox Groups|class|CheckBoxGroupSet|2|Parent
Canvas|1|Boxes|list|0|Gen Indent|integer|3|Gen Interpose|null|Gen
Main|null|Gen Methods|integer|1|Gen Component Setup|integer|1|Gen Init
Dialog|integer|1|Gen Initially|integer|1|Dialog Struct|class|CDialog|4|Min
Width|null|Min Height|null|Ticker
Rate|null|Attribs|list|1|string|bg=yellowish
white|Name|string|dialogmain|Width|integer|644|Height|integer|399|Items|list
|3|class|CanvasMenuBar|22|Parent Canvas|1|Name|string|menu_bar|Var
Category|integer|2|Class Name|string|MenuBar|X Fix|null|Y Fix|null|W
Fix|null|H Fix|null|W Default|integer|1|H Default|integer|1|X
Spec|string|0|Y Spec|string|0|W Spec|string|100%|H Spec|integer|24|X
Align|string|l|Y Align|string|t|Is shaded|null|Is Button Subclass|null|Draw
Border|null|Attribs|list|0|Tooltip|null|Menus|list|2|class|CanvasMenu|14|Nam
e|string|file_menu|Class Name|string|Menu|Var
Category|integer|2|Label|string|File|Label Left|string|(F)|Label
Right|null|Is shaded|null|Img Left|null|Img Left Width|null|Img Left
Height|null|Img
Right|string|9,c1,0~~~~~~~~000~~~~~~00000~~~~0000000~~0000000000000000~~0000
0~~~~000~~~~~~0~~~~~~~~|Img Right Width|integer|9|Img Right
Height|integer|9|Menus|list|1|class|CanvasTextMenuItem|13|Name|string|exit_m
enu_item|Class Name|string|TextMenuItem|Var
Category|null|Label|string|Exit|Label Left|null|Label Right|null|Is
shaded|null|Img Left|null|Img Left Width|null|Img Left Height|null|Img
Right|null|Img Right Width|null|Img Right
Height|null|class|CanvasMenu|14|Name|string|help_menu|Class
Name|string|Menu|Var Category|integer|2|Label|string|Help|Label
Left|null|Label Right|null|Is shaded|null|Img Left|null|Img Left
Width|null|Img Left Height|null|Img
Right|string|9,c1,0~~~~~~~~000~~~~~~00000~~~~0000000~~0000000000000000~~0000
0~~~~000~~~~~~0~~~~~~~~|Img Right Width|integer|9|Img Right
Height|integer|9|Menus|list|2|class|CanvasTextMenuItem|13|Name|string|aboutt
_menu_item|Class Name|string|TextMenuItem|Var
Category|null|Label|string|About...|Label Left|null|Label Right|null|Is
shaded|null|Img Left|null|Img Left Width|null|Img Left Height|null|Img
Right|null|Img Right Width|null|Img Right
Height|null|class|CanvasTextMenuItem|13|Name|string|help_menu_item|Class
Name|string|TextMenuItem|Var Category|null|Label|string|Help|Label
Left|null|Label Right|null|Is shaded|null|Img Left|null|Img Left
Width|null|Img Left Height|null|Img Right|null|Img Right Width|null|Img
Right Height|null|class|CanvasTextButton|32|Parent
Canvas|1|Name|string|ListBtn|Var Category|null|Class
Name|string|TextButton|X Fix|null|Y Fix|null|W Fix|null|H Fix|null|W
Default|null|H Default|null|X Spec|string|22|Y Spec|string|58|W
Spec|string|84|H Spec|string|20|X Align|string|l|Y Align|string|t|Is
shaded|null|Is Button Subclass|integer|1|Draw
Border|null|Attribs|list|0|Tooltip|null|Label|string|List Files|No
Keyboard|null|Img Up|null|Img Down|null|Img Width|null|Img Height|null|Is
Checked Flag|null|Is Checkbox Flag|null|Parent CheckBoxGroup|null|Parent
Button Group|null|Internal Align|string|c|class|CanvasLabel|23|Parent
Canvas|1|Name|string|MsgBox|Var Category|integer|1|Class Name|string|Label|X
Fix|null|Y Fix|null|W Fix|null|H Fix|null|W Default|null|H Default|null|X
Spec|integer|0|Y Spec|integer|48|W Spec|string|632|H Spec|string|309|X
Align|string|l|Y Align|string|t|Is shaded|null|Is Button Subclass|null|Draw
Border|null|Attribs|list|2|string|fg=red|string|font=serif,19,bold|Tooltip|n
ull|Label|string||Internal Align|string|l|Initial Focus|null|



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to