pharo

Pharo Smalltalk and mySql

戏子无情 提交于 2019-12-10 14:31:53
问题 I am looking for someone who knows how to interface Pharo Smalltalk and mySql. I just want to do the basic things like "select * from names" and then read the result into Pharo. Does anyone know anything about this? If you have a screen video that would be super and I would buy you a beer. 回答1: Check out DBXTalk. Mariano Peck gave a presentation on it at ESUG 2011. Here's the abstract and video. I'll take a Blue Moon, please ;-) 回答2: And what do I get? ;) Now, really, let us know if you have

The use of “>>” in Pharo/Smalltalk

核能气质少年 提交于 2019-12-10 10:25:23
问题 I am implementing futures in Pharo. I came across this website http://onsmalltalk.com/smalltalk-concurrency-playing-with-futures. I am following this example and trying to replicate it on Pharo. However, I get to this point the last step and I have no idea what ">>" means: This symbol is not also included as part of Smalltalk syntax in http://rigaux.org/language-study/syntax-across-languages-per-language/Smalltalk.html. BlockClosure>>future ^ SFuture new value: self fixTemps I can see future

How to bind a LabelMorph/TextMorph to a variable so that the Morph reflects changes of the variable?

一世执手 提交于 2019-12-10 09:33:05
问题 I have an object with a variable containing a String. I have a window containing a LabelMorph/TextMorph (or some other Morph that displays Text?). How do i bind the LabelMorph/TextMorph to the variable, so that the label updates when the String in the variable changes? classic Smalltalk-80 dependent/change/update mechanism? Pharo Announcement framework? something different?? How would i do this? Which Morph should i use? 回答1: Depends on what you want to achieve. You might want to take a look

What is the difference between a Morph in Morphic and a NSView in Cocoa?

余生长醉 提交于 2019-12-10 03:26:28
问题 I'd like to know about the things that make Morphic special. 回答1: Morphic is much more than NSView or any other graphics class that simply allow the re-implementation of a limited set of features. Morphic is an extremely malleable UI construction kit. Some design ideas behind Morphic makes this intention clear: A comprehensive hierarchy of 2D coordinate systems is included. They are not restricted to Cartesian or linear. Useful nonlinear coordinate systems include polar, logarithmic

What is the correct way to test Unicode support in a Smalltalk implementation?

江枫思渺然 提交于 2019-12-08 20:38:25
问题 Given any Smalltalk flavor, how should I proceed to check if Unicode is supported? In case of not having support, how can I detect at which level is missing (VM, font, Converter, etc)? 回答1: At the VM level you can try Character codePoint: 256 or Character codePoint: 65536 (some Smalltalks may use value: instead of codePoint: still). Converter APIs differ between dialects too, but chances are that if the VM supports Unicode so will the converters. As far as I know, no Smalltalk fully supports

FileDirectory and ReferenceStream Class equivalents in Pharo?

北慕城南 提交于 2019-12-08 01:10:33
问题 I'm doing the persistance example at: http://book.seaside.st/book/advanced/persistency/image-based-persistency It involves creating a method that uses the FileDirectory class like this: SMFileDatabase class>>backupDirectory ^ (FileDirectory default directoryNamed: self name) assureExistence. Pharo seems to be unable to find the Class and the closest that comes out in search is FileDirectoryWrapper. Will this do? NB. I can't figure this out myself since I've never used FileDirectory or

Packages for developing static web sites in Smalltalk?

陌路散爱 提交于 2019-12-07 19:14:19
问题 What would be good (cross Smalltalk, mantained, documented) web frameworks or packages (in terms of fewer things to learn/adapt) to use for implementing a static web site with really few forms? .i.e. : a search box and a contact form. I have no "model" or application behind, so I'm not searching for CMS or web application capabilities. There is any example or simple script of a static web site developed in any web frameworks? please I'm NOT interested in counter or 'Hello World' examples. The

How to get the compiled method the is being executed

痴心易碎 提交于 2019-12-07 17:07:31
问题 How to get an instance of CompiledMethod that is currently being executed? i.e. someMethod | thisMethod | thisMethod := "here I want to access an instance of _CompiledMethod_ that refers to #someMethod". ^ thisMethod selector 回答1: Method that is currently being executed can be retrieved by #method message from current context, which can be accessed through thisContext pseudo variable. This way example code will look like this: someMethod | thisMethod | thisMethod := thisContext method. ^

How do I enable the middle mouse button for Pharo on Ubuntu?

倖福魔咒の 提交于 2019-12-07 12:06:55
问题 I'm fairly new to Pharo. I'm running Ubuntu Raring Ringtail (13.04) and using the PPA recommended on the Pharo web site, together with the Pharo 30218 image, and looking to enable the middle-click capability. (I have a Logitech trackball, and several apps are already aware enough to use the scrolling capability of the middle wheel. So, I think it's something I need to do specifically for Pharo.) 回答1: I'm on mac so my answer may not be that useful for you. But the middle mouse button does not

How do I copy a stacktrace out of the debugger in Pharo?

北慕城南 提交于 2019-12-07 07:10:12
问题 How do I copy a stacktrace out of the debugger in Pharo? I know there's the Debug.log file somewhere near the image, but I'm far too lazy to navigate out of Pharo, to the file system, find the folder, and browse through a gigantic text file if there's a stack trace right in front of me. 回答1: I know a way, but it is not the best. When you are inside the debugger, right click -> "mail out bug report" and there you can copy/paste the stacktrace heheheh Another option is to bring ctrl + click in