Re: [Factor-talk] Factor application not working under Windows
Thank you for letting me know about that bug. Hopefully it will be fixed soon. For my second problem, it occurs after loading gradient-docs. Since I cannot really manage to isolate my problem, I would like to send you my project file. However, I cannot send it since it exceeds the allowed 40 ko of the message. Is there a way I can send it ? 2013/1/8 Samuel Proulx proulxsam...@gmail.com Thank you for letting me know about that bug. Hopefully it will be fixed soon. For my second problem, it occurs after loading gradient-docs. Since I cannot really manage to isolate my problem, I can give you my source code. I apologize for the poor quality of my code, it's my first project in Factor. I know of many ways I can improve it now. P.S. : The resources.txt file is not made yet for the deployment. It doesn't cause any problem under Linux if I don't try to execute the program. P.S.S.: I first tried to send the complete project with the images but it was too big, so I only send the factor file this time. 2013/1/7 Samuel Proulx proulxsam...@gmail.com Thank you for letting me know about that bug. Hopefully it will be fixed soon. For my second problem, it occurs after loading gradient-docs. Since I cannot really manage to isolate my problem, I can give you my source code. I apologize for the poor quality of my code, it's my first project in Factor. I know of many ways I can improve it now. P.S. : The resources.txt file is not made yet for the deployment. It doesn't cause any problem under Linux if I don't try to execute the program. 2013/1/7 John Benediktsson mrj...@gmail.com Unfortunately, the black background is an open issue we haven't had a chance to fix: https://github.com/slavapestov/factor/issues/152 It seems pretty fixable but no one has stepped up yet :) The deploy error is strange, since the deploy tests work fine on all platforms. Could you help us reproduce it? Thanks, John. On Mon, Jan 7, 2013 at 12:18 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I tried to use my program on Windows (7), after programming it under Linux. I got I few surprises. First of all, the labels which are on non-white tracks ( they have a gradient in their interior slot ) have a black background. I tried to change the background slot of the label's font, but I didn't notice any difference. Secondly, when I try to deploy my application, I get the following error : Cannot create slice from 16384 to 37444 seqB{ 137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 ~2662 more~ } reason end sequence What does that mean? Thanks in advance, Samuel P.S.: I'm using the version 0.95 of Factor on both Linux and Windows -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Factor application not working under Windows
Hi, I tried to use my program on Windows (7), after programming it under Linux. I got I few surprises. First of all, the labels which are on non-white tracks ( they have a gradient in their interior slot ) have a black background. I tried to change the background slot of the label's font, but I didn't notice any difference. Secondly, when I try to deploy my application, I get the following error : Cannot create slice from 16384 to 37444 seqB{ 137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 ~2662 more~ } reason end sequence What does that mean? Thanks in advance, Samuel P.S.: I'm using the version 0.95 of Factor on both Linux and Windows -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Include resources in a deployed application
Ok, thank you! 2013/1/3 Jon Harper jon.harpe...@gmail.com I don't remember exactly, but I think you need to create another vocab that is not in a subfolder of the vocab you are deploying, put the resources in there with a resources.txt file. I guess you also have to USE: this new vocab from your main vocab. Or you could apply the patch in the second comment, which changes the name of the executable to be different than the directory containing the resources. It's probably easier for you. Jon On Fri, Jan 4, 2013 at 12:07 AM, Samuel Proulx proulxsam...@gmail.comwrote: No John, it doesn't work for me. I already tried that before posting my question. And Yes, Jon, I'm running on Archlinux and, from what I saw, I seem to be experiencing that issue. I don't quite understand the solution though. Note that a workaround is make the vocab with the resources not a child of the deployed vocab: ie instead of A and A.theme, use A and A-theme. How do I do that? 2013/1/3 Jon Harper jon.harpe...@gmail.com Are you using GNU/linux ? If so, you might be experiencing this issue: https://github.com/slavapestov/factor/issues/678 Regards, Jon Jon On Thu, Jan 3, 2013 at 11:07 PM, John Benediktsson mrj...@gmail.comwrote: I think for your example you would have a resources.txt in your x vocabulary directory (e.g., work/x/resources.txt). In it would be a single line with test.png. Does that work? On Thu, Jan 3, 2013 at 2:02 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I've been trying to deploy an application, but I can't figure out how to include image files to my program. MAIN-WINDOW: test { { title Test } } vocab:x/test.png image-gadget gadgets ; I read that I need to include them in the resources.txt file. In the previous example, I would need to include the test.png image. I tried a couple of things, but I don't understand how to I am supposed to include that image without getting an error. Thanks in advance, Samuel -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now
[Factor-talk] Include resources in a deployed application
Hi, I've been trying to deploy an application, but I can't figure out how to include image files to my program. MAIN-WINDOW: test { { title Test } } vocab:x/test.png image-gadget gadgets ; I read that I need to include them in the resources.txt file. In the previous example, I would need to include the test.png image. I tried a couple of things, but I don't understand how to I am supposed to include that image without getting an error. Thanks in advance, Samuel -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Radio-buttons not working
I see. Thank you! Le jeudi 27 décembre 2012, Jon Harper a écrit : As stated in the documentation of gadget, you can't use the children slot directly: children - a vector of child gadgets. Do not modify this vector directly, instead use add-gadget, add-gadgets, unparent or clear-gadget. In your case, replacing a 1vector children relayout with [ clear-gadget ] [ a add-gadget ] bi solves the problem. In your particular case, the parent of the child gadget was not correctly set to the viewport, which breaks clicks on buttons. Also, the initialization code (see graft*) of the child gadget was not run, so models were not properly activated and linked Cheers, Jon Jon On Thu, Dec 27, 2012 at 6:37 PM, Samuel Proulx proulxsam...@gmail.comjavascript:_e({}, 'cvml', 'proulxsam...@gmail.com'); wrote: Hi, I just made the following scroller containing two radio-buttons: SYMBOL: model f model model set : a ( -- test ) model get { True False } enum radio-buttons { 4 4 } border ; a scroller dup gadget. It works fine when I click on the buttons. Although, If I try to change the viewport of the scroller (even to the exact same thing), the buttons suddently stop working: dup viewport a 1vector children relayout What did I do wrong ? Thanks in advance, Samuel -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net javascript:_e({}, 'cvml', 'Factor-talk@lists.sourceforge.net'); https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Quotation stack effect
Hi, I just have a quick question. Is it possible to make an each quotation have a stack effect such as ( x -- x ) or do we have to stick with the standard ( x -- ) ? Thanks in advance, Samuel -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Quotation stack effect
Thank you for your answers. That's what I was looking for. 2012/12/26 Doug Coleman doug.cole...@gmail.com How about 'map'? On Dec 26, 2012 10:48 AM, Samuel Proulx proulxsam...@gmail.com wrote: Hi, I just have a quick question. Is it possible to make an each quotation have a stack effect such as ( x -- x ) or do we have to stick with the standard ( x -- ) ? Thanks in advance, Samuel -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] UI example
You might want to have a look at this. It has been previously asked. http://www.mail-archive.com/factor-talk@lists.sourceforge.net/msg06018.html Hope that helps, Samuel 2012/12/22 Leonard P leonard14...@gmail.com Any simple UI examples out there? - Leonard -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Border child
Hi, I tried to change the child of a border. Judging by the help ( \ border help ), I only need to change the child slot. So I tried this: Test label { 5 5 } border dup gadget. Worked label child Error : Generic word child does not define a method for the border class. What does that mean? What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border child
I see! Thank you guys! 2012/12/19 PGGB grizzlysc...@gmail.com If you inspect the border on the stack you will notice, that the slot you are trying to change is actually called children, which is a vector that contains the label. So this would work: Test label { 5 5 } border dup gadget. Worked label 1vector children On 19.12.2012, at 17:14, Samuel Proulx proulxsam...@gmail.com wrote: Hi, I tried to change the child of a border. Judging by the help ( \ border help ), I only need to change the child slot. So I tried this: Test label { 5 5 } border dup gadget. Worked label child Error : Generic word child does not define a method for the border class. What does that mean? What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border child
It worked fine with borders, so I thought it would be the same with scrollers. I tried the same thing you proposed me for the borders with the scrollers. It doesn't work. What do I do if I want to change the gadget slot of a scroller ( \ scroller help ) ? 2012/12/19 Samuel Proulx proulxsam...@gmail.com I see! Thank you guys! 2012/12/19 PGGB grizzlysc...@gmail.com If you inspect the border on the stack you will notice, that the slot you are trying to change is actually called children, which is a vector that contains the label. So this would work: Test label { 5 5 } border dup gadget. Worked label 1vector children On 19.12.2012, at 17:14, Samuel Proulx proulxsam...@gmail.com wrote: Hi, I tried to change the child of a border. Judging by the help ( \ border help ), I only need to change the child slot. So I tried this: Test label { 5 5 } border dup gadget. Worked label child Error : Generic word child does not define a method for the border class. What does that mean? What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Button stack effect problem
I've been experimenting with it and I now have another question. I've figured a way to use symbols in the quotations like so: SYMBOL: a 1 a set Press *a get* *'*[ drop *_* ... ] border-button gadget. I don't know if that's the best the way to do it but it works. Although, what I would like to do is to set the value of the symbol a from inside the quotation. How can I do that? 2012/12/17 Samuel Proulx proulxsam...@gmail.com I see! Thank you for your help and your explanations! 2012/12/17 Jon Harper jon.harpe...@gmail.com The quotation you pass to the border-button constructor gets called by the system when the button is pressed. At this time, the stack has nothing to do with the stack shown in the listener. So you don't have the reference to the label. To have a reference to the label when the quotation is called, you should make a closure. This can be done with curry (or, in this case, the more appropriate with): Test label dup gadget. Press [ drop Worked text drop ] with border-button gadget. Other ways of creating closures are fried quotations ( http://docs.factorcode.org/content/article-fry.html) or local variables ( http://docs.factorcode.org/content/article-locals.html) Cheers, Jon On Mon, Dec 17, 2012 at 10:48 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, Yet another problem... Hopefully the last though. I tried to make a button that changes the text slot of a previously made label. Here's what I did: Test label dup gadget. Press [ drop Worked text ] border-button gadget. I got an error message saying Data stack underflow when I clicked it. So I checked the quotation stack effect: [ drop Worked text ] infer. ( x x -- x ) It should take the button, drop it since I don't need it, take the label, and then change its text to Worked. It doesn't do it though. What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Button stack effect problem
Yes, it makes sense to me. Thank you! Le mardi 18 décembre 2012, John Benediktsson a écrit : If you use global values, this should work: SYMBOL: a 1 a set-global Press [ drop a get-global ... ] border-button gadget. The problem with set and get, is that the 'set' is using the namespace of the listener which may (likely not) be the namespace of the quotation being executed by the quotation. Namespaces are hierarchical, so you want to make sure that the value is set in either the current scope or one of the outer scopes to be accessible. Does that make sense? By the way, there are several ways to get your code to work, through currying as was mentioned previously, namespaces like you are trying now, or even subclassing a button and storing your value in a slot, e.g: TUPLE: a-button button a ; : a-button ( label quot -- button ) a-button new-button border-button-theme ; Press [ a ... ] a-button 1 a gadget. Best, John. On Tue, Dec 18, 2012 at 10:26 AM, Samuel Proulx proulxsam...@gmail.comwrote: I've been experimenting with it and I now have another question. I've figured a way to use symbols in the quotations like so: SYMBOL: a 1 a set Press *a get* *'*[ drop *_* ... ] border-button gadget. I don't know if that's the best the way to do it but it works. Although, what I would like to do is to set the value of the symbol a from inside the quotation. How can I do that? 2012/12/17 Samuel Proulx proulxsam...@gmail.com I see! Thank you for your help and your explanations! 2012/12/17 Jon Harper jon.harpe...@gmail.com The quotation you pass to the border-button constructor gets called by the system when the button is pressed. At this time, the stack has nothing to do with the stack shown in the listener. So you don't have the reference to the label. To have a reference to the label when the quotation is called, you should make a closure. This can be done with curry (or, in this case, the more appropriate with): Test label dup gadget. Press [ drop Worked text drop ] with border-button gadget. Other ways of creating closures are fried quotations ( http://docs.factorcode.org/content/article-fry.html) or local variables ( http://docs.factorcode.org/content/article-locals.html) Cheers, Jon On Mon, Dec 17, 2012 at 10:48 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, Yet another problem... Hopefully the last though. I tried to make a button that changes the text slot of a previously made label. Here's what I did: Test label dup gadget. Press [ drop Worked text ] border-button gadget. I got an error message saying Data stack underflow when I clicked it. So I checked the quotation stack effect: [ drop Worked text ] infer. ( x x -- x ) It should take the button, drop it since I don't need it, take the label, and then change its text to Worked. It doesn't do it though. What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support fo -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Button stack effect problem
Hi, Yet another problem... Hopefully the last though. I tried to make a button that changes the text slot of a previously made label. Here's what I did: Test label dup gadget. Press [ drop Worked text ] border-button gadget. I got an error message saying Data stack underflow when I clicked it. So I checked the quotation stack effect: [ drop Worked text ] infer. ( x x -- x ) It should take the button, drop it since I don't need it, take the label, and then change its text to Worked. It doesn't do it though. What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Button stack effect problem
I see! Thank you for your help and your explanations! 2012/12/17 Jon Harper jon.harpe...@gmail.com The quotation you pass to the border-button constructor gets called by the system when the button is pressed. At this time, the stack has nothing to do with the stack shown in the listener. So you don't have the reference to the label. To have a reference to the label when the quotation is called, you should make a closure. This can be done with curry (or, in this case, the more appropriate with): Test label dup gadget. Press [ drop Worked text drop ] with border-button gadget. Other ways of creating closures are fried quotations ( http://docs.factorcode.org/content/article-fry.html) or local variables ( http://docs.factorcode.org/content/article-locals.html) Cheers, Jon On Mon, Dec 17, 2012 at 10:48 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, Yet another problem... Hopefully the last though. I tried to make a button that changes the text slot of a previously made label. Here's what I did: Test label dup gadget. Press [ drop Worked text ] border-button gadget. I got an error message saying Data stack underflow when I clicked it. So I checked the quotation stack effect: [ drop Worked text ] infer. ( x x -- x ) It should take the button, drop it since I don't need it, take the label, and then change its text to Worked. It doesn't do it though. What did I do wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Border-button quotation
Hi, I'm sorry to spam the mailing list so much those last few days, I just have a project in mind but I'm having such a hard figuring it out in Factor. I've been trying to make a border-button for a UI. I looked at the help ( \ border-button help ). I don't understand its quot parameter. It says it's a quotation with stack effect ( button -- ). Since I don't really understand the part with a stack effect, I decided to try something: Press [ The button has been pressed. print ] border-button gadget. The button appears correctly, but when I click on it, I get the error Quotation's stack effect does not match call site. Can someone tell what I did wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border-button quotation
Thank you for your answer! I don't get the error message anymore. Although, is it normal if the message The button has been pressed doesn't show in the listener? Le dimanche 16 décembre 2012, John Benediktsson a écrit : For convenience, the quotation is called with the button object that was clicked. If you don't want it, you can just drop it. Press [ *drop *The button has been pressed. print ] border-button gadget. On Sun, Dec 16, 2012 at 4:01 PM, Samuel Proulx proulxsam...@gmail.comjavascript:_e({}, 'cvml', 'proulxsam...@gmail.com'); wrote: Hi, I'm sorry to spam the mailing list so much those last few days, I just have a project in mind but I'm having such a hard figuring it out in Factor. I've been trying to make a border-button for a UI. I looked at the help ( \ border-button help ). I don't understand its quot parameter. It says it's a quotation with stack effect ( button -- ). Since I don't really understand the part with a stack effect, I decided to try something: Press [ The button has been pressed. print ] border-button gadget. The button appears correctly, but when I click on it, I get the error Quotation's stack effect does not match call site. Can someone tell what I did wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net javascript:_e({}, 'cvml', 'Factor-talk@lists.sourceforge.net'); https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border-button quotation
Thank you very much to both of you! Hopefully one day I'll be good enough to give back everything I've learned and you taught me. 2012/12/16 John Benediktsson mrj...@gmail.com What Doug said. Also, feel free to send your questions, we're here to help. It's not spam. On Sun, Dec 16, 2012 at 5:02 PM, Doug Coleman doug.cole...@gmail.comwrote: You can print to the global namespace and it should show up in the terminal (Windows, Linux) or in Console (Mac). Press [ *drop [ *The button has been pressed. print ] with-global ] border-button gadget. Doug On Sun, Dec 16, 2012 at 4:58 PM, Samuel Proulx proulxsam...@gmail.comwrote: Thank you for your answer! I don't get the error message anymore. Although, is it normal if the message The button has been pressed doesn't show in the listener? Le dimanche 16 décembre 2012, John Benediktsson a écrit : For convenience, the quotation is called with the button object that was clicked. If you don't want it, you can just drop it. Press [ *drop *The button has been pressed. print ] border-button gadget. On Sun, Dec 16, 2012 at 4:01 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I'm sorry to spam the mailing list so much those last few days, I just have a project in mind but I'm having such a hard figuring it out in Factor. I've been trying to make a border-button for a UI. I looked at the help ( \ border-button help ). I don't understand its quot parameter. It says it's a quotation with stack effect ( button -- ). Since I don't really understand the part with a stack effect, I decided to try something: Press [ The button has been pressed. print ] border-button gadget. The button appears correctly, but when I click on it, I get the error Quotation's stack effect does not match call site. Can someone tell what I did wrong? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Changing the text on a label
I see! I was thinking about a really complex way to do it even though it is actually a very simple thing to do. Thank you once again for your help! 2012/12/15 John Benediktsson mrj...@gmail.com If you look at a label: IN: scratchpad \ label help You'll see that it has a text slot. Changing it will change the text it displays: IN: scratchpad hello, world label dup gadget. IN: scratchpad goodbye, world text See that the text changes in the display? Thanks, John. On Sat, Dec 15, 2012 at 1:06 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I've tried to do it for quite a while, but I still can't figure it out. I would like to make a label for a UI which I can change the text on. For example, when you click on a button to change the page, the title would change for the one of that new page. I've thought about making a tuple that inherits from the label class with a change-text method. Would that work? How should I do it? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Game programming in Factor
Hi, I was wondering what was the best way to make simple 2D games with Factor. I've been programming simple games in Python using either Pygame or Pyglet, which is pretty easy and straightforward. Although, in Factor, I doesn't appear to work the same way. My questions are the following: 1. Which vocabulary should I use? I'm guessing I should use the OpenGl vocabulary in combinaison with the game vocabulary for things such as the main loop. Is that right? 2. Are there any tutorial about game programming in Factor? / Where shall I start? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Game programming in Factor
Thank you John! I'll look this up and I'll hopefully be able to figure it out. 2012/12/7 John Benediktsson mrj...@gmail.com I suggest you look at the game.loop vocabulary (in addition to general opengl things). Joe Groff has some blogs about it, one of the first is here: http://duriansoftware.com/joe/The-Factor-game-framework.html These demos might be useful to look at: IN: scratchpad tetris run IN: scratchpad boids run IN: scratchpad terrain run Also, there are some demos using the GPU: IN: scratchpad: gpu.demos.bunny run IN: scratchpad: gpu.demos.raytrace run Also, this is a fun little game demo built by Joe: https://github.com/jckarter/papier On Fri, Dec 7, 2012 at 6:57 AM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I was wondering what was the best way to make simple 2D games with Factor. I've been programming simple games in Python using either Pygame or Pyglet, which is pretty easy and straightforward. Although, in Factor, I doesn't appear to work the same way. My questions are the following: 1. Which vocabulary should I use? I'm guessing I should use the OpenGl vocabulary in combinaison with the game vocabulary for things such as the main loop. Is that right? 2. Are there any tutorial about game programming in Factor? / Where shall I start? Thanks in advance, Samuel -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] A few questions about the UI vocabulary
Hi, It's my first time here, so I hope I'm doing it right. I'm learning Factor and I'm currently playing with the UI vocabulary. Although, there are a few things I can't figure out with it. I've already looked in the Browser, but I can't find what I'm looking for. My questions are the following : 1. How can I display a full text with automatic line breaks ? The only thing I found to be able to display text is labels, but I'm not sure it is the way to go... 2. How can I display an image and how do I make it resize and keep its proportions ? I tried to use icons in tracks, but, again, I don't think it's the way to go. 3. I do I make a gradient? I've managed to fill a gadget with a solid color, but I can't find out how to make a gradient. gradient in ui.pens.gradient takes colors as parameter but how do I do I give it the colors ? An array of solid colors ? Thanks in advance, Samuel -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk