2013-02-20 42 views
0

我讀過一些關於Marmalade Framework的教程。你知道......這是完全真棒:) 例如:爲什麼Marmalade有這麼奇怪的命名?

// Creating an Image from a Web Based Image File: 
CIwGameFile* image_file = new CIwGameFile(); 
image_file->Open("http://site...../icon.gif", false, true); 
image_file->Close(); 

// Now we will create a sprite to display our downloaded web image: 
CIwGameBitmapSprite* test_sprite = new CIwGameBitmapSprite(); 
test_sprite->setImage(image); 
test_sprite->setDestSize(image->getWidth(), image->getHeight()); 

爲什麼?爲什麼第一個方法有大寫(打開,關閉)名稱,第二個是小寫(setImage,getWidth)?他們這樣做有什麼常識嗎?還是Marmalade在整個圖書館裏都有這麼好的語法?

回答

1

果醬使用Upper Camel case所有的方法(據我所見)。你所說的方法不是Marmalade自己的API方法。這些是IwGame發動機的方法。果醬對此無法控制。

+0

感謝您的回答! – JavaRunner 2013-02-22 09:47:39

2

IwGame使用第一個字母小寫字母作爲setter和getters使用

+1

我只是不喜歡上駱駝的情況下:))))我希望果醬低駱駝案哈哈:))這是很難與一個項目中的較低的駱駝案例和上部駱駝案件(如果我使用lwGame與橘子果醬)。 – JavaRunner 2013-02-25 19:48:23

相關問題