首先:我之前从未与Smalltalk合作过,所以这对我来说有点文化冲击。我使用的是Squeak 5.1(32位)。
现在我的问题:我想从GitHub存储库安装Smalltalk项目。我使用此代码成功安装了Metacello,在Transcript中执行它:
"Get the Metacello configuration (for Squeak users)"
Installer gemsource
project: 'metacello';
addPackage: 'ConfigurationOfMetacello';
install.
"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
((Smalltalk at: #ConfigurationOfMetacello) project
version: #'previewBootstrap') load.
"Load the Preview version of Metacello from GitHub"
(Smalltalk at: #Metacello) new
configuration: 'MetacelloPreview';
version: #stable;
repository: 'github://dalehenrich/metacello-work:configuration';
load.
"Now load latest version of Metacello"
(Smalltalk at: #Metacello) new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
get.
(Smalltalk at: #Metacello) new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
load.
我还使用以下代码安装了Metacello Scripting API:
Installer gemsource
project: 'metacello';
install: 'ConfigurationOfMetacello'.
如果我现在想要从GitHub存储库安装项目,例如:
Metacello new
baseline: 'Animations';
repository: 'github://hpi-swa/animations/repository';
load.
然后我总是得到这个错误:
gofer repository error: 'GoferRepositoryError: UndefinedObject>>thisOSProcess'...ignoring
我错过了什么吗?
答案 0 :(得分:2)
你是绝对正确的,那是行不通的。 OSProcess尚未被标记为与Squeak 5.1兼容,即使它是,它也没有被Metacello吸引。我会向开发者报告此事。
同时您可以使用
加载OSProcesspublic ReadFromDB()
{
var client = new MongoClient("mongodb://localhost:27017");
var database = client.GetDatabase("test");
var collectionWatchtbl = database.GetCollection<BsonDocument>("UserWatchtbl");
var filter = new BsonDocument();
var user = new List<UserWatchTblCls>();
var cursor = collectionWatchtbl.FindAsync(filter).Result;
cursor.ForEachAsync(batch =>
{
user.Add(BsonSerializer.Deserialize<UserWatchTblCls>(batch));
});
}
public class UserWatchTblCls
{
[BsonId]
[BsonElement("_id")]
public ObjectId Id { get; set; }
public string fbId { get; set; }
public string Name { get; set; }
[BsonElement("pass")]
public string Pass { get; set; }
[BsonElement("Watchtbl")]
public List<WatchTblCls> WatchTbls { get; set; }
}
public class WatchTblCls
{
[BsonElement("wid")]
public string WID { get; set; }
[BsonElement("name")]
public string Name { get; set; }
[BsonElement("Symboles")]
public List<SymboleCls> Symbols { get; set; }
}
public class SymboleCls
{
public string Name { get; set; }
}