<div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello ,</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> While trying to implement menubar within a packer frame , I'm getting a runtime error . The code is as </SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-module(Menubar_with_packer).</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-export([start/0]).</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in
0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">start()-></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> GSStart = gs:start(),</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> WH = [{width,1000},{height,750}],<BR> Win = gs:window(GSStart,[{title," Menu_Bar with packer "},<BR> {map, true},{configure,true},{width,1000},{height,750}]),</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> F1 =
gs:frame(packer,Win,[{packer_x,[{stretch,1,15},{stretch,1,15},{stretch,1,15}]},{packer_y,[{stretch,1,15},{stretch,1,15},{stretch,1,15}]}]),<BR> Bar = gs:menubar(F1,[{pack_x,{1,3}},{pack_y,1}),</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> Menu_Item1 = gs:create(menubutton,Bar, [{label,{text,"ABC"}},{pack_x,1},{pack_y,1}]),<BR> Menu_item2 = gs:create(menubutton, Bar, [{label, {text,"MNO"}},{pack_x,2},{pack_y,1}]),</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> gs:config(F1,WH),</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> loop(F1).</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div>
<div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loop(F1)-></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> receive </SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> {gs,_,configure,_Data,[Width,Height|,_]} -> gs:config(F1,[{width,Width},{height,Height}]),</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY:
Arial"> loop(F1);</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> Any -> loop(F1)</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> end.</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal
style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> Could you please tell me whether packing menubar within a packer frame is possible in erlang , or is there some problem with my code ?</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Waiting for your reply ,</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards,</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Vikash</SPAN></div><p>
<hr size=1></hr>
Yahoo! India Answers: Share what you know. Learn something new <a href="http://us.rd.yahoo.com/mail/in/mailanswersshare/*http://in.answers.yahoo.com/">Click here</a><br>
Catch all the FIFA World Cup 2006 action on Yahoo! India <a href="http://us.rd.yahoo.com/mail/in/mailfifa/*http://in.sports.yahoo.com/football/football_fifa.html">Click here</a>