问题标签 [gnustep]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1009 浏览

objective-c - 我如何在 GNUstep 中使用 Objective-C 的属性特性?

我正在尝试在 GNUstep 中使用 Objective-C 2.0 特性属性(使用 Windows)。

但我不能使用@property 符号和@synthesize。

尽管我的所有代码都是正确的,但编译器无法编译我的属性代码。

编译器也无法理解“@”符号。

我可以在 GNUstep 中使用属性功能吗?

如果它可以使用,请告诉我我该怎么做?

谢谢你的时间。

0 投票
1 回答
536 浏览

header-files - 如何在 Windows XP 中找到 GNUstep 中的头文件

我对目标 c 完全陌生。我正在尝试编译一个非常基本的“hello world”程序,但问题是 gcc 编译器无法确定我的头文件在哪里。我在 cygwin bash shell 上写道:

给出的错误是:

我在 windows xp 上使用 GNUstep,安装了所有需要的组件。我知道并且已经看到存在头文件。请有人可以指导我如何找到这些文件?或者我应该如何给自己定位文件的命令?有没有其他可能的方法可以永久告诉我在这个文件夹中找到了头文件。

也请有人指出一个很好的链接,我可以从中学习目标c。实际上,我正在准备自己构建一个 iPhone 应用程序,并且由于某些原因需要在 windows 上练习几个星期....

请帮我。非常感谢提前

0 投票
2 回答
2300 浏览

android - 在 Dl_Info 上编译失败

我正在尝试使用 Android NDK Make 构建项目,但出现以下错误。

我假设这是来自 dlfcn.h 但它不像我没有找到一个文件所以我猜它正在加载......

1.) dlfcn.h 有问题吗?2.)知道如何解决吗?

0 投票
0 回答
52 浏览

gnustep - GNUStep 和类方法

在 GNUstep 目标 c 的文档中,它声明“不允许覆盖继承的类方法”。然后继续说您可以在子类中覆盖诸如 [NSString version] 之类的版本。版本方法是异常,还是第一条语句为假?

提前致谢 :-)

0 投票
1 回答
183 浏览

objective-c - 使用 GNUStep 编译 App Wrappers

我按照 GNUStep 网站上的指示逐字执行。这是我的制作文件。

这是目录的内容(请注意,在教程中没有提到创建 main.m 文件。我认为这是以某种方式自动生成的。如果这是教程作者部分的遗漏,请告诉我。还有什么应该main.m 文件包含。

我通过切换到目录并运行 make 进行编译,这是我收到的输出。

现在我可以看到这与 main.m 文件有关,但是从输出中我不确定从这里去哪里。任何帮助将不胜感激,因为我是 GNUstep 的新手。使用gorm时我是否错误地删除了它的创建?

0 投票
4 回答
1616 浏览

objective-c - Prevent scientific notation with NSDecimalNumber output as NSString

I have a problem similar to the one in this question: How to obtain an unformatted string representation of an NSDecimal or NSDecimalNumber? I need to have a number in string format accurately represented as an NSNumber, but this number is converted back to a string in other places, and I can't avoid that. The problem I'm having is that when the number is converted back to a string, the string is in scientific notation in some cases.

How can I prevent this number from being displayed in scientific notation?

I am working in a circa 2005 version of GNUstep (possibly v1.11.1 for GNUstep Base), rather than on mac or iPhone, which may account for some of the differences in behavior vs the other question I referenced. I have looked over the base library API and the documentation in my own GNUstep install, but I can't seem to find anything to help.

EDIT 2/7/12:

The question has changed slightly, but the goal is still the same. Originally, I didn't think I was able to control the string output piece, but I can pass the value back as a string. At this point I am attempting to use a formatting string, but I still want to prevent the scientific notation from appearing.

I've chosen to use %g because we would like a specific number of significant digits for the value. If I use %f, I can trim the extra zeros, but the number does not always come out cleanly. 800000000.79 appears as 800000000.7899999600, for example.

Is there a way to get a cleanly formatted number with up to a certain number of significant digits (or decimal places) without displaying scientific notation before that number of digits?

I'm willing to accept C advice as well.

0 投票
1 回答
174 浏览

objective-c - GNUstep/Objective-c 和 nib 文件

我不认为我完全理解对象及其源文件如何与 Gorm 交互。当您将 NSObject 之类的类子类化时,它似乎会根据您使用插座和操作对其进行配置的方式来存储该对象的快照。

我的第一个问题是这个类存储在哪里(在它被实例化到 nib 之前,因为它不是实现文件而且它还没有在 nib 中?

在此处输入图像描述

AppController(我的自定义子类)的配置存储在上图中的位置?它是一个临时文件吗,因为它在实例化之前就存在。

现在,一旦它被实例化,它似乎就是那个类的快照,但你还没有实现它,那么如果你可以在保存 *.gorm 文件后进行配置,它是如何被冻干到 nib 中的?

在此处输入图像描述

在上图中,AppController 的图标似乎是对象,但我还没有编写实现,那么两者是在什么时候以及如何绑定的。nib 中的 AppController 是充当对象的代理,还是在我编译时将对象序列化到 nib 中?

抱歉,如果这令人困惑,我试图尽可能地解释我的问题。我非常感谢任何帮助。:-)

0 投票
1 回答
70 浏览

gnustep - GNUstep 制作 dist

无论如何要配置make dist提前创建的存档的名称?我必须重新创建文件很多。此外,您还如何控制存档的版本。

谢谢 :-)

0 投票
1 回答
90 浏览

gnustep - GNUstep 主文件实现

我不确定创建一个看起来像这样的主文件的确切目的

超过一个看起来像这样的

特别是与调用sharedApplication:和设置委托有关。

您可以提前设置委托的唯一好处是,还有其他理由使用第一种方法吗?你还需要设置一个代表吗?

0 投票
1 回答
393 浏览

objective-c - 在 Windows 上为 ios 应用程序编译 Objective-C 代码

我知道可以通过 gnuStep 在 Windows 上编译 Objective-c代码。GnuStep 克隆了大部分苹果库,但不是全部。所以我正在寻找聪明的方法来找到剩余的课程,因为我假设在其他操作系统上使用苹果库可能违反苹果的许可证。(请不要说购买 mac 或 wmvare 解决方案)。谢谢。